<?php
use common\components\helpers\Fun;
use yii\helpers\Html;
use common\components\extenders\MenuManage;
?>
<div class="yx-cnt-box">
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height">
    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check" >
            <thead>
              <tr class="yx-bgd2f6ec">
                <th>学生姓名</th>
                <th>年龄</th>
                <th>性别</th>
                <th>家长姓名</th>
                <th>电话号码</th>
                <th>卡号</th>
                <th>操作</th>
            </tr>
            </thead>
            <?php foreach ($student as $i => $v) { ?>
                <tr>
                    <td><?= \yii\helpers\Html::encode($v->name); ?></td>
                    <td><?= \yii\helpers\Html::encode((int)date('Y')-$v->age); ?></td>
                    <td><?= $v->sex==0?'女':'男';?></td>
                    <td><?=isset($v->customer->name)?\yii\helpers\Html::encode($v->customer->name):''?></td>
                    <td><?=isset($v->customer->mobile)? \yii\helpers\Html::encode($v->customer->mobile):'' ?></td>
                    <td><?= \yii\helpers\Html::encode($v->customer->card_id); ?></td>
                    <td><?=(new MenuManage(MenuManage::TOP_MENU))->detailsMenu('growthlog','growth',true,['class' => 'btn yx-radius2 yx-d-card yx-bg94d5a2','data'=>['id'=>$v['id'],'class_id'=>$class_id]]);?></td>
                </tr>
            <?php } ?>
        </table>
    </div>
</div>
</div>